package org.example.platform.design.guanchazhe;

/**
 * 观察者模式
 */
public class Test {

    public static void main(String[] args) {
        QianTai q = new QianTai();
        TongShi t = new TongShi();
//        t.setName("老李");
        t.setName("老王");
        q.setAction("lail");
        q.add(t);
        TongShi t2 = new TongShi();
        t2.setName("老李");
        q.add(t2);
        q.run();
    }
}
